package com.huayue.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.huayue.dao.*;
import com.huayue.entity.Authority;

/**
 * 权限
 */
@Service
public class AuthorityService extends BaseService<Authority> {

    @Autowired
    MenuDao menuDao;

    @Autowired
    RoleDao roleDao;

    @Autowired
    DepartmentDao departmentDao;

    @Autowired
    AuthorityDao authorityDao;

    @Override
    public BaseDao<Authority> getDao() {
        return authorityDao;
    }

    public List<Map<String, Object>> findAllTopAuthority() {
        return authorityDao.findAllTopAuthority();
    }

    public List<Map<String, Object>> findAllMenu() {
        return menuDao.findAll();
    }

    public List<Map<String, Object>> findAllRole() {
        return roleDao.findAll();
    }

    public List<Map<String, Object>> findAllDep() {
        return departmentDao.findAll();
    }
}
